-
Notifications
You must be signed in to change notification settings - Fork 4.2k
CAS: move DRA consts go into core #8595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAS: move DRA consts go into core #8595
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jackfrancis The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this would be a fine solution if we don't mind the cloud provider specific constant moving to the core code.
does the gpu_processor_test need that value?
Name: "nodeGPUViaDra", | ||
Labels: map[string]string{ | ||
gce.DraGPULabel: "true", | ||
gpu.DraGPULabelGKE: "true", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, sorry for missing this part during review. IMO this test code shouldn't depend on anything GCE/GKE-specific. And it in fact doesn't, this test case doesn't really test anything at the moment. The Node is treated as ready because it doesn't have the GPU label that TestCloudProvider.GPULabel()
returns, not because it has the DRA enablement label.
I think something like this would be much better (and would actually test the DRA part of the logic):
- Extend
TestCloudProvider
to allow configuring the result ofTestCloudProvider.GetNodeGpuConfig()
from the test code. - Change this test to configure the result of
TestCloudProvider.GetNodeGpuConfig()
differently in different test cases. - Make this one into a test case where the Node does have the
TestCloudProvider.GPULabel()
label, and the behavior is different based on the result ofTestCloudProvider.GetNodeGpuConfig()
(the Node is ready ifDraDriverName
is set, the Node is not ready ifExtendedResourceName
is set).
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the DraGPULabelGKE
is not required for the test, then i'm in favor of using a more neutral label like something from the test provider. as long as we don't introduce the circular dependency ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jackfrancis Yup, this is exactly what I meant in step 1 - LGTMd the PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure we don't want this PR (though we have an interesting thread convo that we should continue!) |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
By moving the newly added GKE DRA consts to core it enables them to be re-used in customprocessor tests (to help validate the GKE use case) while also accommodating this change to enable cloud providers to inject custom scale down processors: #8583
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: